<%@taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql"%>
<c:set var='view' value='/index' scope='session' />


<div id="main">
    <!-- BEGIN SLIDESHOW -->
    <div id="slideshow"> <ul id="slides">
            <li><a href="#"><img SRC="js/images/1.jpg" alt="" width="922" height="287" /></a></li>
            <li> <a href="#"> <img SRC="js/images/2.jpg" alt=""  width="922" height="287" /></a></li>
            <li> <a href="#"><img SRC="js/images/3.jpg" alt=""  width="922" height="287" /></a></li>
            <li> <a href="#"> <img SRC="js/images/4.jpg" alt="" width="922" height="287" /></a></li>
        </ul>
        <div id="slideshow_violator" class="clearfix">
            <div id="slide_navigation" class="clearfix"></div>
        </div>
    </div>
    <!-- END SLIDESHOW -->
    <!-- START SIDEBAR -->
    <div id="sidebar">
        <!-- TOP3 des ventes -->
        <div class="box">
            <h4 class="title" align="center">TOP 3</h4>
                <c:forEach var="prod" items="${decstop}" varStatus="iter">
                    ${(((iter.index+1) % 1) == 0) ? '<li class="last">' : '<li>'}
                    <h5 class="name"><a HREF="<c:url value='/product?${prod.produit.idproduit}'/>">${prod.description.descriptionBref}</a></h5>
                    <div class="price">${prod.produit.prix} &#8364 (-${prod.produit.remise}%)</div>
                    <form name="frm_registrar" id="frm_registrar" action="<c:url value='/addcart'/>" method="post">
                        <input id="inputtext1" size="1" maxlength="3" style="text-align:center" type="hidden" name="quantity" value="1" onkeyup="this.value=validarSiNumero(this.value)"/>
                        <input type="hidden" name="productid" value="${prod.produit.idproduit}">
                        <input type="image"  src="data/icones/panier.jpg" name="inputsubmit1" align="right" value="<fmt:message key='ajouter'/>" />
                    </form>
                    </li>
                    </br></br>
                </c:forEach>
        </div>


        <br></br>

        <!-- Image de livraison gratuite -->
        <div class="box" align="center">
            <img class="content" src="data/images/free_shipping.jpg" alt="free shipping" />		 
        </div>
        <br></br>
        <!-- Image de notre mission -->
        <div class="box" align="center">
            <img class="content" src="data/images/notre_mission.gif" alt="Notre mission" />
            <div class="content" >
                <ul>
                    <c:if test="${admin}">
                        <li>
                            <a href="<c:url value='/admin'/>"><fmt:message key='administration'/></a>
                        </li>
                    </c:if>
                </ul>
            </div>
        </div>
        <!-- Images de modes de paiement -->
        <div id="icons"> <img SRC="css/images/paypal.jpg" alt="paypal" border="0" /> <img SRC="css/images/visa.jpg" alt="visa" border="0" /> <img SRC="css/images/mastercard.jpg" alt="mastercard" border="0" /> </div>
    </div>
    <!-- END SIDEBAR -->
    <!-- BEGIN CONTEINER -->
    <div id="content">
        <!-- Affichage de quelques bons plans -->
        <h2 id="title"><fmt:message key="offers"/></h2>
        <ul class="products">
            <c:forEach var="prod" items="${decsremise}" varStatus="iter">
                ${(((iter.index+1) % 2) == 0) ? '<li class="last">' : '<li>'}              
                <a HREF="<c:url value='/product?${prod.produit.idproduit}'/>" class="image"><img SRC="${initParam.productImagePath}${prod.produit.image}" /></a>
                <div class="price">${prod.produit.prix} &#8364 (${prod.produit.remise}% <fmt:message key="dereduction"/>)</div>
                <form name="frm_registrar" id="frm_registrar" action="<c:url value='/addcart'/>" method="post">
                    <label for="inputtext1"><fmt:message key='quantity'/>:</label>
                    <input id="inputtext1" size="1" maxlength="3" style="text-align:center" type="text" name="quantity" value="1" />
                    <input type="hidden" name="productid" value="${prod.produit.idproduit}">
                    <input type="image"  src="data/icones/panier.jpg" name="inputsubmit1" align="right" value="<fmt:message key='ajouter'/>" />
                </form>
                <h3 class="name"><a HREF="<c:url value='/product?${prod.produit.idproduit}'/>">${prod.description.descriptionBref}</a></h3>
                </li>
            </c:forEach>
        </ul>
    </div>
    <!-- END CONTENT -->
    <div class="sp"></div>
</div>
<div class="sp"></div>
</div>